from django.db import models


class Sex(models.Model):
    id = models.IntegerField(primary_key=True)
    gender = models.CharField(max_length=10, blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'sex'


class Users(models.Model):
    account = models.CharField(max_length=20)
    password = models.CharField(max_length=50)
    name = models.CharField(max_length=20, blank=True, null=True)
    sex = models.ForeignKey(Sex, models.DO_NOTHING, db_column='sex')

    class Meta:
        managed = False
        db_table = 'users'


class Xiaoshuo(models.Model):
    name = models.CharField(max_length=50, blank=True, null=True)
    url = models.CharField(max_length=100, blank=True, null=True)
    jianjie = models.TextField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'xiaoshuo'

